'''斐波那契数列'''


def fib(n):
    '''输出n的斐波那契数列'''
    print('fib: ', end='')
    a, b = 0, 1
    while a < n:
        print(a, end=' ')
        a, b = b, a+b
    print()


def fib2(n):
    '''返回n的斐波那契数列'''
    print('fib2: ', end='')
    result = []
    a, b = 0, 1
    while a < n:
        result.append(a)
        a, b = b, a + b
    return result


if __name__ == '__main__':
    import sys
    fib(int(sys.argv[1]))
